<div class="post">
  <div class="post_left">
    <div class="post_details_left">
      <div class="date">
        <%= @media.creation.strftime("%d %b %Y") %></div>
        <div class="misc">
          <% if session[:user]!=nil %>
            <%= button_to("Edit", :action=>"edit",:id=>@media.id) -%>
          <% end %>
          <%= _("User:") %><%= @media.user.login %><br/>
          <%= _("Category:") %><%= link_to @media.category.name,url_for(:controller=>"media",:action=>"category",:id=>@media.category.name) %><br/>
          <%= _("Tags:") %><%= @media.tags.collect{|t| link_to(t.name,url_for(:controller=>"media",:action=>"tag",:id=>t.name))}.join(" ") unless @media.tags.count==0 %>
        </div>
      </div>
    </div>
  <div class="post_right">
    <p class="post_title">
      <%= link_to image_tag(@media.category.image,:border =>0,:align=>"top"),url_for(:controller=>"media",:action=>"category",:id=>@media.category.name) %> <%= link_to HTMLEntities.decode_entities(@media.title), url_for(:controller=>@media.permalink) %>
    </p>
    <div class="post_text"><%= find_and_preserve(RedCloth.new(HTMLEntities.decode_entities(@media.text)).to_html) %>
      <p class="post_details">
        <%= link_to _("comments"), url_for(:controller=>@media.permalink+"/#comments") %>:<%= @media.comments.find(:all,:conditions=>"published=1 and banned=0").size %>&nbsp;<%= link_to _("Add comment"),:controller=>"comment",:action=>"new",:id=>@media.id %>&nbsp;<%= link_to _("permalink"), url_for(:controller=>@media.permalink) %>&nbsp;
      </p>
    </div>
  </div>
</div>
